import Vue from 'vue'
// 引入仓库
import Vuex from 'vuex'
//安装
Vue.use(Vuex);

//引入小仓库
import home from './modules/home'
import search from './modules/search'
import detail from './modules/detail'
import shopcart from './modules/shopcart'
import user from './modules/user'
import trade from './modules/trade';


//对外暴露仓库
export default new Vuex.Store({
    // 在大仓库上注册小仓库
    modules: {
        home,
        search,
        detail,
        shopcart,
        user,
        trade
    }
})